package hot100;

import com.链表.练习题.ListNode;

public class g2_反转链表 {
    public ListNode reverseList(ListNode head){
        ListNode n = null;
        ListNode p = head;
        while(p != null){
            n = new ListNode(p.val,n);
            p = p.next;
        }
        return n;
    }

}
